package cn.hinglo.permission.bean.model;

import com.jfinal.plugin.activerecord.ActiveRecordPlugin;


/**
 * @author HingLo
 * @description: 字典
 */
public class MappingKit {

    public static void mapping(ActiveRecordPlugin arp) {
        arp.addMapping("menu", "id", Menu.class);
        arp.addMapping("permission", "id", Permission.class);
        arp.addMapping("role", "id", Role.class);
        // Composite Primary Key order: mid,role_id
        arp.addMapping("role_menu", "mid,role_id", RoleMenu.class);
        // Composite Primary Key order: permission_id,role_id
        arp.addMapping("role_permission", "permission_id,role_id", RolePermission.class);
        arp.addMapping("services", "id", Services.class);
        arp.addMapping("user", "id", User.class);
        // Composite Primary Key order: role_id,user_id
        arp.addMapping("user_role", "role_id,user_id", UserRole.class);
    }
}
